package com.pilipala.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Swagger的配置类
 */
@Configuration
@Slf4j
public class SwaggerConfig {

    /**
     * 接口文档
     * @return 设置的Bean
     */
    @Bean
    public OpenAPI openAPI(){
        return new OpenAPI()
                .info(new Info().title("Swagger接口文档")
                        .description("接口文档")
                        .version("v1"));
    }

}
